home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 1.5 KB | 66 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWFixMem.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: (c) 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWFIXMEM_H
- #define FWFIXMEM_H
-
- #include <stddef.h>
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Foreware declarations
- //========================================================================================
-
- struct FW_SPrivFixedNode;
- struct FW_SPrivFixedBlock;
-
- //========================================================================================
- // CLASS FW_CFixedAllocator
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CFixedAllocator
- {
- public:
-
- // ----- Construction
-
- FW_CFixedAllocator(short allocSize);
- ~FW_CFixedAllocator();
-
- // ----- Allocation
-
- void* Allocate();
- void Free(void* block);
-
- // ----- Implementation
-
- private:
- long fAllocCount;
- short fAllocSize;
- FW_SPrivFixedNode* fFreeList;
- FW_SPrivFixedBlock* fBlockList;
-
- // No copying
- FW_CFixedAllocator(const FW_CFixedAllocator& );
- FW_CFixedAllocator& operator=(const FW_CFixedAllocator& );
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif // FWFIXMEM_H
-